package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        //想文件fos.txt中写入文本数据
        FileOutputStream fos = new FileOutputStream("fox.txt",true);

        String line ="在他的床上你还舒服嘛,还会大声的尖叫吗";
        byte [] date = line.getBytes(StandardCharsets.UTF_8);
        fos.write(date);

        line = "小泽老师名集";
        date = line.getBytes(StandardCharsets.UTF_8);
        fos.write(date);
        line = "人间尤物";
        date = line.getBytes(StandardCharsets.UTF_8);
        fos.write(date);


        line = "供君享用";
        fos.write(line.getBytes(StandardCharsets.UTF_8));

        fos.close();
    }
}
